<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var a = 11;


        // alert(10 % 2);


        /*
            奇数： 1 3 5 7 9 ....
            偶数： 2 4 6 8 10 ...... / 2  => 余数为0 


        */

        if(a % 2){
            alert('这是奇数');
        }else{
            alert('这是偶数');
        }

    </script>
</body>
</html>